{"ast":null,"code":"var _jsxFileName = \"/data/messenger.client/src/containers/FindUsers.tsx\",\n  _s = $RefreshSig$();\nimport React from \"react\";\nimport { FindUsers as FindUsersList } from \"../components/\";\nimport { UserService } from \"../services\";\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nconst FindUsers = () => {\n  _s();\n  const [usersList, setUsersList] = React.useState({\n    items: []\n  });\n  const [inputValue, setInputValue] = React.useState('');\n  const onChangeInput = async function () {\n    let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n    await UserService.FindUsers({\n      searchValue: value\n    }).then(res => {\n      if (res.status === 200) {\n        setUsersList({\n          ...usersList,\n          items: res.data\n        });\n      }\n    });\n    setInputValue(value);\n  };\n  return /*#__PURE__*/_jsxDEV(FindUsersList, {\n    users: usersList,\n    onSearch: onChangeInput,\n    inputValue: inputValue\n  }, void 0, false, {\n    fileName: _jsxFileName,\n    lineNumber: 23,\n    columnNumber: 12\n  }, this);\n};\n_s(FindUsers, \"erjqgncorHLk+zDD0zfNQk4/Dtk=\");\n_c = FindUsers;\nexport default FindUsers;\nvar _c;\n$RefreshReg$(_c, \"FindUsers\");","map":{"version":3,"names":["React","FindUsers","FindUsersList","UserService","usersList","setUsersList","useState","items","inputValue","setInputValue","onChangeInput","value","searchValue","then","res","status","data"],"sources":["/data/messenger.client/src/containers/FindUsers.tsx"],"sourcesContent":["import React from \"react\";\nimport {FindUsers as FindUsersList} from \"../components/\";\nimport {UsersListResponse} from \"../models/response/UsersListResponse\";\nimport {UserService} from \"../services\";\n\nconst FindUsers:React.FC = () => {\n    const [usersList, setUsersList] = React.useState<UsersListResponse>({items: []});\n    const [inputValue, setInputValue] = React.useState<string>('');\n\n    const onChangeInput = async (value: string = '') => {\n        await UserService.FindUsers({searchValue: value}).then((res: any) => {\n            if (res.status === 200) {\n                setUsersList({\n                    ...usersList,\n                    items: res.data\n                });\n            }\n        });\n\n        setInputValue(value);\n    };\n\n    return <FindUsersList\n        users={usersList}\n        onSearch={onChangeInput}\n        inputValue={inputValue}\n    />;\n\n};\n\nexport default FindUsers;"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAQC,SAAS,IAAIC,aAAa,QAAO,gBAAgB;AAEzD,SAAQC,WAAW,QAAO,aAAa;AAAC;AAExC,MAAMF,SAAkB,GAAG,MAAM;EAAA;EAC7B,MAAM,CAACG,SAAS,EAAEC,YAAY,CAAC,GAAGL,KAAK,CAACM,QAAQ,CAAoB;IAACC,KAAK,EAAE;EAAE,CAAC,CAAC;EAChF,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAGT,KAAK,CAACM,QAAQ,CAAS,EAAE,CAAC;EAE9D,MAAMI,aAAa,GAAG,kBAA8B;IAAA,IAAvBC,KAAa,uEAAG,EAAE;IAC3C,MAAMR,WAAW,CAACF,SAAS,CAAC;MAACW,WAAW,EAAED;IAAK,CAAC,CAAC,CAACE,IAAI,CAAEC,GAAQ,IAAK;MACjE,IAAIA,GAAG,CAACC,MAAM,KAAK,GAAG,EAAE;QACpBV,YAAY,CAAC;UACT,GAAGD,SAAS;UACZG,KAAK,EAAEO,GAAG,CAACE;QACf,CAAC,CAAC;MACN;IACJ,CAAC,CAAC;IAEFP,aAAa,CAACE,KAAK,CAAC;EACxB,CAAC;EAED,oBAAO,QAAC,aAAa;IACjB,KAAK,EAAEP,SAAU;IACjB,QAAQ,EAAEM,aAAc;IACxB,UAAU,EAAEF;EAAW;IAAA;IAAA;IAAA;EAAA,QACzB;AAEN,CAAC;AAAC,GAvBIP,SAAkB;AAAA,KAAlBA,SAAkB;AAyBxB,eAAeA,SAAS;AAAC;AAAA"},"metadata":{},"sourceType":"module"}